package com.jandar.spider;

import com.jandar.spider.config.SeleniumConfig;
import com.jandar.spider.schedule.ContentBiddingSchedule;
import com.jandar.spider.schedule.PunishSchedule;
import com.jandar.spider.utils.SeleniumUtil;
import org.openqa.selenium.WebDriver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.scheduling.annotation.EnableScheduling;

@EnableConfigurationProperties
@SpringBootApplication
@EnableScheduling
public class SpiderApplication implements CommandLineRunner {

    @Autowired
    PunishSchedule punishSchedule;
    @Autowired
    ContentBiddingSchedule contentBiddingZJSchedule;

    public static void main(String[] args) {
        SpringApplication.run(SpiderApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
//        punishSchedule.exec();
        contentBiddingZJSchedule.exec();
    }
}
